{include file = 'f-header.tpl'}

<div class="main">
	<div class="s_left">
				<img src="{$baseUrl}/public/images/logo_s.png" />
				<img style="margin-left:-5px;" src="{$baseUrl}/public/images/s1.png" />
				<form>
					<select>
						<option value="">Categoria</option>
						<option value="">Categoria</option>
						<option value="">Categoria</option>
					</select>
					<select>
						<option value="">Categoria</option>
						<option value="">Categoria</option>
						<option value="">Categoria</option>
					</select>
					<select>
						<option value="">Categoria</option>
						<option value="">Categoria</option>
						<option value="">Categoria</option>
					</select>
					<input class="kw" name="" value="keyword..." />
					<a href="#" class="search"><img src="{$baseUrl}/public/images/search.png" /></a>
				</form>
				<a href="#"><img style="padding:8px;" src="{$baseUrl}/public/images/6.jpg" /></a>
			</div>
			<div class="s_right">

                <div class="white_back">
                    <h3>上传相册照片</h3>
                    <form action="{$baseUrl}photo/upPhoto?callback=pic" enctype="multipart/form-data" method="post" target='photo_iframe' >
                    <input type="hidden" name="id" value="{$id}" />
                    <input  name='file[]' type='file' multiple ></input>
                    <input type='submit' value='上传' />
                    </form>
                    <iframe name="photo_iframe" style="display:none" ></iframe>

                    <div id="pic_box">
                </div>
                <h3>photo列表</h3>
                    {foreach item="value" key="key" from=$rs} 
                    <p><span class='version'>{$key}:
                        {foreach item="v" key="k" from=$value} 
                        {$k}--{$v}
                        {/foreach}
                       </span>
                    </p>
                    {/foreach}
                    {$table}


        </div>

    </div>
</div>
<div class="clear"></div>

{literal}
<script src='{/literal}{$baseUrl}{literal}public/jquery.js' ></script>
<script>

function pic(data){
    
    console.log(data);
    var json=eval('('+data+')'); 
    if(true==json['isSuc']){

        alert("上传成功");

        window.location.reload();

        /*
        rs=json["pics"];
        
        for(val in rs){
                 
            str ="<div>";
            str+="<img src="+rs[val]+"  />";            
            str+="<input type='text' />";
            str+="</div>";
            $("#pic_box").append(str);
            
        }
        */
        
        
    }
    else{

        alert(上传失败);     

    }

}

</script>
{/literal}

{include file = 'f-footer.tpl'}
